# Maintainer: Daniel Sabogal <dsabogalcc@gmail.com>
pkgname=sfml
pkgver=2.5.1
pkgrel=1
pkgdesc="Simple and Fast Multimedia Library"
url="https://www.sfml-dev.org/"
arch="all"
license="zlib"
makedepends="cmake doxygen eudev-dev flac-dev freetype-dev jpeg-dev
	mesa-dev libpng-dev libogg-dev libvorbis-dev libx11-dev
	libxrandr-dev libxcb-dev openal-soft-dev xcb-util-image zlib-dev"
subpackages="$pkgname-dev $pkgname-doc"
options="!check"
source="https://github.com/SFML/SFML/archive/$pkgver/sfml-$pkgver.tar.gz"
builddir="$srcdir/SFML-$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSFML_BUILD_DOC=TRUE \
		-DSFML_INSTALL_PKGCONFIG_FILES=TRUE
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install

	mkdir -p "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/share/SFML/doc "$pkgdir"/usr/share/doc/SFML
}

sha512sums="7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59  sfml-2.5.1.tar.gz"
